<div class="m-l nav navbar-nav m-t block" style="width:300px;">
	<span>订单管理 ></span>
	<span>普通用户订单 ></span>
	<span>订单列表</span>
</div>

<div class="m-t-lg">
	<div class="wrapper-sm">
		<div class="panel panel-default">
			<div class="panel-body">
				<div style="border-color: #e5e5e5;padding: 10px;background-color: #e5e5e5">
					<div class="row">
						<div class="col-md-6">
							<div class="input-group">
								<input type="text" class="form-control" placeholder="订单编号/手机号" [(ngModel)]="keyWord">
								<span class="input-group-btn">
					        <button class="btn btn-default" type="button" (click)="search()">查询</button>
					      </span>
							</div>
						</div>
						<!-- <div class="col-md-4" style="text-align: right">
						<button class="btn btn-info" (click)="myModal.show()">
							新增
						</button>
					</div> -->
					</div>
				</div>
				<div class="table-responsive">
					<table class="table table-hover table-striped m-b-none default footable">
						<thead>
							<tr>
								<th>订单编号</th>
								<th>手机号</th>
								<th>开始时间</th>
								<th>预定时长</th>
								<th>应付费用</th>
								<th>实付费用</th>
								<th>使用时长</th>
								<th>结束时间</th>
								<th>订单状态</th>
								<th>支付状态</th>
								<th>操作记录</th>
							</tr>
						</thead>
						<tbody>
							<tr *ngFor="let orderdata of orderdata">
								<td>{{orderdata.order_number}}</td>
								<td>{{orderdata.user_telephone}}</td>
								<td>{{orderdata.created_at}}</td>
								<td>{{(orderdata.order_status<0?orderdata.record_use_time:orderdata.order_use_time)|hm}}</td>
								<td>{{orderdata.order_status<0?orderdata.record_money:orderdata.order_money}}元</td>
								<td>{{orderdata.order_real_money}}元</td>
								<td>{{(orderdata.order_status<0?0:orderdata.order_use_real_time)|hm}}</td>
								<td>{{orderdata.order_status==0?'使用中':orderdata.updated_at}}</td>
								<td>
									<span *ngIf="orderdata.order_status>=0" class="{{orderdata.order_status==0?'text-info':'text-success'}}">{{orderdata.order_status==0?'进行中':'已完成'}}</span>
									<span *ngIf="orderdata.order_status<0">{{orderdata.order_status==-1?'无效订单':'待付款'}}</span>
								</td>
								<td>
									<span *ngIf="orderdata.order_status<0">未支付</span>
									<span *ngIf="orderdata.order_status>=0" class="{{(orderdata.order_money>orderdata.order_real_money&&orderdata.order_status==1)?'text-danger':'text-success'}}">{{(orderdata.order_money>orderdata.order_real_money&&orderdata.order_status==1)?'欠费':'正常'}}</span>
								</td>
								<td>
									<a style="color: blue;" [routerLink]="['detail',orderdata.order_number ]">订单详情</a>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<app-pagination [pageModel]="pageModel" (pageChanged)="getData($event)"></app-pagination>
			</div>
		</div>
	</div>
</div>